package com.knowif.backend.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.knowif.backend.service.CommentService;
import com.knowif.backend.vo.VirtualCommentVo;
import com.knowif.system.model.RestBean;

/**
 * @author xingyao
 * @Description: 添加虚拟评论功能
 */
@RestController
@RequestMapping("/commnet")
public class CommentController {

	
	@Autowired
	private CommentService commentService;
	
	/**
	 * @author: xingyao 
	 * @Description:  添加虚拟评论
	 * @param tUser
	 * @param tutorInfo
	 * @param userComment
	 * @return
	 */
	@PostMapping("/addVirtualComment")
	public RestBean<?> addVirtualComment(@RequestBody VirtualCommentVo virtualCommentVo){
		return commentService.addVirtualComment(virtualCommentVo.gettUser(), virtualCommentVo.getTutorInfo(), virtualCommentVo.getUserComment());
	}
}
